Repository navigation
[FSSDK-13413] Remove the old browser/UMD test setup and Karma leftovers - #1187
Merged
Merged
Conversation
tests/browser now covers browser and UMD testing, so remove what it replaced: - root vitest.browser.config.mts / vitest.umd.config.mts, scripts/run-browser-tests.js, scripts/run-umd-tests.js, scripts/patch-vitest-viewport.js and vitest/umd-plugin.ts - the test-browser* / test-umd* root scripts, and the @vitest/browser, browserstack-local and webdriverio root devDependencies (including the optional-peer tree npm would otherwise keep in the lockfile) - the commented-out cross-browser CI job tests/browser no longer borrows from the root vitest/ folder: the request logger, console-capture plugin (merged into the local one) and public/console-capture.js move into it, and the UMD bundle is copied to tests/browser/public/dist. Karma leftovers: delete lib/index.browser.umdtests.js (dead; its imports no longer exist), the *.umdtests.js ignore patterns, and the BROWSER_STACK_* env var fallbacks. Comments and docs describe the current setup instead of comparing it with the removed one; vitest3-compat.setup.ts is now restore-all-mocks.setup.ts. The root README points browser testing at tests/browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the browser-test consolidation.
No open issues 🎉
What changed in this PR
Completes the browser-test migration from #1186 by removing the superseded root setup and consolidating test support under tests/browser. No SDK runtime code changes.
Changes:
- Removes obsolete browser/UMD runners, configs, dependencies, and Karma leftovers.
- Moves logging utilities and public assets into
tests/browser, including the UMD bundle destination. - Updates testing documentation and comments to describe the current setup.
| File | Description |
|---|---|
vitest/umd-plugin.ts |
Deletes the obsolete root UMD plugin. |
vitest/console-capture-plugin.ts |
Deletes the superseded root console-capture plugin. |
vitest.umd.config.mts |
Deletes the old root UMD configuration. |
vitest.browser.config.mts |
Deletes the old root browser configuration. |
tsconfig.spec.json |
Removes the obsolete UMD test exclusion. |
tsconfig.json |
Removes the obsolete UMD test exclusion. |
tests/browser/vitest.umd.config.mts |
Updates the bundle-location comment. |
tests/browser/vitest.shared.mts |
Uses local assets and renamed setup; removes legacy credential fallbacks. |
tests/browser/vitest.browser.config.mts |
Imports the request logger locally. |
tests/browser/umd-plugin.ts |
Updates comments for the current setup. |
tests/browser/run.js |
Copies the UMD bundle locally and removes legacy credential fallbacks. |
tests/browser/restore-all-mocks.setup.ts |
Renames the mock-reset setup and clarifies comments. |
tests/browser/request-logger-plugin.ts |
Relocates request logging into the browser project. |
tests/browser/README.md |
Documents current commands, environment variables, and setup. |
tests/browser/public/console-capture.js |
Relocates the browser console-capture script. |
tests/browser/package.json |
Updates the project description. |
tests/browser/legacy-polyfills-plugin.ts |
Removes historical comparisons from comments. |
tests/browser/console-capture-plugin.ts |
Implements the logging endpoint locally while retaining script injection. |
scripts/run-umd-tests.js |
Deletes the obsolete UMD runner. |
scripts/run-browser-tests.js |
Deletes the obsolete browser runner. |
scripts/platform-utils.js |
Removes the legacy UMD test exclusion. |
scripts/patch-vitest-viewport.js |
Deletes the obsolete viewport workaround. |
README.md |
Directs contributors to tests/browser. |
package.json |
Removes root browser/UMD scripts and dependencies. |
package-lock.json |
Prunes obsolete dependencies and updates Babel runtime. |
lib/index.browser.umdtests.js |
Deletes unused Karma-era UMD tests. |
.platform-isolation.config.js |
Removes the legacy UMD test exclusion. |
.github/workflows/javascript.yml |
Removes a commented-out job and updates setup comments. |
.eslintignore |
Removes the obsolete UMD test ignore pattern. |
Review effort: Balanced
Md Junaed Hossain (junaed-optimizely)
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1186.
tests/browsernow runs browser and UMD tests in CI, so this removes the setup it replaced, plus leftovers from the Karma era.vitest.browser.config.mts,vitest.umd.config.mts,scripts/run-browser-tests.js,scripts/run-umd-tests.js,scripts/patch-vitest-viewport.js,vitest/umd-plugin.ts.package.json: removed thetest-browser*/test-umd*scripts and the@vitest/browser,browserstack-localandwebdriveriodevDependencies.npm uninstallalone would have kept@vitest/browser/webdriverioand their dependencies as optional peers of the root Vitest, so those were pruned too. Re-resolving moved@babel/runtimefrom 7.28.4 to 7.29.13 (in range).tests/browserself-contained. It no longer imports from the rootvitest/folder, which is gone.public/console-capture.jsmoved into it./__vitest_console__endpoint and injects the script viatransformIndexHtml.tests/browser/public/dist, which is gitignored viadist/.lib/index.browser.umdtests.js. Nothing ran it, and two of its imports no longer exist.*.umdtests.jspatterns from.eslintignore, both tsconfigs,.platform-isolation.config.jsandscripts/platform-utils.js.BROWSER_STACK_*env var fallbacks and the commented-outcrossbrowser_and_umd_unit_testsCI job.tests/browserREADME describe the current setup instead of comparing it with the removed one.vitest3-compat.setup.tsis renamed torestore-all-mocks.setup.ts.tests/browser.CHANGELOG.mdkeeps its historical entries.No SDK source changes.
Test plan
npm run validate-platform-isolation: passes.npm run lint: 0 errors.npm run test-vitest: 1128 passed.npm run test-mocha: 815 passing.tests/browser, local Chrome:npm run test-umd-local(full rolldown build, bundle copied topublic/dist): 2/2.VITEST_CONSOLE_CAPTURE/VITEST_REQUEST_LOGGER): both work from their new location.umdtestsorBROWSER_STACKoutsideCHANGELOG.mdand lockfiles.browser_testsjob).Issues
🤖 Generated with Claude Code